package com.guoyh.bilbase.pop.pop

import android.annotation.SuppressLint
import android.content.Context
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import com.lxj.xpopup.core.BottomPopupView

@SuppressLint("ViewConstructor")
abstract class BaseBottomPop<DB : ViewDataBinding>(context: Context) : BottomPopupView(context) {

    lateinit var mDataBind: DB

    override fun getImplLayoutId(): Int {
        return getImplLayout()
    }


    override fun onCreate() {
        super.onCreate()
        mDataBind = DataBindingUtil.bind(popupImplView)!!
        onViewCreate()
        onBindClick()
    }

    abstract fun getImplLayout(): Int
    abstract fun onViewCreate()

    protected open fun onBindClick(){

    }

}